﻿namespace OpenPms.Models;

public class VPriceQuantity
{
    /// <summary>
    /// 房型代码
    /// </summary>
    public Guid RoomTypeId { get; set; }
    /// <summary>
    /// 房型名称
    /// </summary>
    public string RoomTypeName { get; set; } = default!;
    /// <summary>
    /// 数量
    /// </summary>
    public int Quantity { get; set; }
    /// <summary>
    /// 每日价格
    /// </summary>
    public List<VPrice> Prices { get; set; } = new List<VPrice>();
    public VPriceQuantity() { }
    public VPriceQuantity(Guid id, string name)
    {
        RoomTypeId = id;
        RoomTypeName = name;
    }
    public VPriceQuantity(Guid id, string name, int quantity)
    {
        RoomTypeId = id;
        RoomTypeName = name;
        Quantity = quantity;
    }
    public override string ToString()
    {
        return this.ToJsonString();
    }
}
public class VPrice
{
    /// <summary>
    /// 日期
    /// </summary>
    public DateOnly Date { get; set; }
    /// <summary>
    /// 价格，若为0，则表示不能预订
    /// </summary>
    public decimal Price { get; set; }
    /// <summary>
    /// 钟点房超时价格，若为0，则表示不能预订
    /// </summary>
    public decimal? DelayPrice { get; set; }
    public VPrice() { }
    public VPrice(DateOnly date, int price, int? delayPrice)
    {
        this.Date = date;
        this.Price = price;
        this.DelayPrice = delayPrice;
    }

}